package com.itheima.controller;

import com.itheima.domain.entity.ShopType;
import com.itheima.domain.vo.Result;
import com.itheima.service.IShopTypeService;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
@RequestMapping("/shop-type")
public class ShopTypeController {
    @Resource
    private IShopTypeService shopTypeService;

    /**
     * 获取店铺类型
     */
    @GetMapping("/list")
    public Result getShopTypeList(){
        log.info("查询店铺类型：");
        List<ShopType> shopTypes = shopTypeService.getShopTypeList();
        return Result.ok(shopTypes);
    }
}
